import request from '@/utils/request'
const baseUrl = process.env.VUE_APP_TMS_CONSOLE_HOST

export function fetchEnterpriseList(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-company/search`,
    method: 'post',
    data
  })
}
// 更新或者新增
export function createEnterprise(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-company/add`,
    method: 'post',
    data
  })
}
// 批量删除
export function delEnterprise(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-company/batchDelete`,
    method: 'post',
    data: {
      ids: data
    }
  })
}
export function getEnterpriseById(id) {
  return request({
    url: `${baseUrl}/api/v1/tms-company/${id}`,
    method: 'get'
  })
}
export function auditEnterpriseAccountStatus(id) {
  return request({
    url: `${baseUrl}/api/v1/tms-company/review/${id}`,
    method: 'post'
  })
}

